package com.cartview.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.cartview.bean.CartView;


public class CartViewDao extends HibernateDaoSupport implements ICartViewDao {

	@Override
	public List<CartView> getAllCart() {
		List<CartView> view = this.getHibernateTemplate().find("from CartView");
		return view;
	}

	@Override
	public List<CartView> getCartByUsername(String username) {
		List<CartView> view = this.getHibernateTemplate().find("from CartView where cart_id = ?", username);
		return view;
	}

}
